package file;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class BufferIn {

	public static void main(String[] args) throws IOException {
		BufferedInputStream bis=new BufferedInputStream(new FileInputStream("D:"+File.separator+"demo.txt"));
		BufferedOutputStream bos=new BufferedOutputStream(new FileOutputStream("D:"+File.separator+"good.txt"));
		int b=0;
		while((b=bis.read())!=-1){
			bos.write(b);
		}
		bos.close();
		bis.close();
	}

}
